package com.sms.shared;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;
@Entity
@Table(name="partysiterelation")
public class PartySiteRelation implements Serializable{
	
	public PartySiteRelation(){
		
	}

	@Id
	@GenericGenerator(name = "generator", strategy = "increment")
    @GeneratedValue(generator = "generator")
	@Column(name = "Id")
	private Long id;
	
	@ManyToOne(fetch=FetchType.LAZY)
	@JoinColumn(name = "partyId", insertable = false, updatable = false)
	private PARTY party;
	
	@ManyToOne(fetch=FetchType.LAZY)
	@JoinColumn(name = "siteId", insertable = false, updatable = false)
	private Site site;
	
	@ManyToOne(fetch=FetchType.LAZY)
	@JoinColumn(name = "relationId", insertable = false, updatable = false)
	private Relationship relationship;
	
	@Column(name = "createdDate")
	private java.util.Date createdDate;
	
	@Column(name = "updatedDate")
	private java.util.Date updatedDate;
	
	@Column(name = "isActive")
	private Boolean isActive;

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public PARTY getParty() {
		return party;
	}

	public void setParty(PARTY party) {
		this.party = party;
	}

	public Site getSite() {
		return site;
	}

	public void setSite(Site site) {
		this.site = site;
	}

	public java.util.Date getCreatedDate() {
		return createdDate;
	}

	public void setCreatedDate(java.util.Date createdDate) {
		this.createdDate = createdDate;
	}

	public java.util.Date getUpdatedDate() {
		return updatedDate;
	}

	public void setUpdatedDate(java.util.Date updatedDate) {
		this.updatedDate = updatedDate;
	}

	public Boolean getIsActive() {
		return isActive;
	}

	public void setIsActive(Boolean isActive) {
		this.isActive = isActive;
	}

	public Relationship getRelationship() {
		return relationship;
	}

	public void setRelationship(Relationship relationship) {
		this.relationship = relationship;
	}
	
	
}
